package com.hbnu.service.impl;

import com.hbnu.bean.Door;
import com.hbnu.dao.DoorMapper;
import com.hbnu.service.DoorService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import javax.persistence.criteria.CriteriaBuilder;
import java.util.List;

/**
 * @Auther: hjx
 * @Date: 2023/4/19 09:42
 * @Description:
 */
@Service
public class DoorServiceImpl implements DoorService {
    @Resource
    private DoorMapper doorMapper;

    public List<Door> findAllDoors() {
        return doorMapper.findAllDoors();
    }

    public void NewDoorAdd(Door door) {
        doorMapper.NewDoorAdd(door);
    }

    public void DeleteDoorById(Integer id) {
        doorMapper.DeleteDoorById(id);
    }

    public Door findDoorById(Integer id) {
        return doorMapper.findDoorById(id);
    }

    public void UpdateDoorById(Door door) {
        doorMapper.UpdateDoorById(door);
    }
}

